package com.fzu.commonutil.mapper;

import com.fzu.commonutil.entity.OrderForm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzu.commonutil.params.SelectResult;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zyq
 * @since 2023-03-26
 */
public interface OrderFormMapper extends BaseMapper<OrderForm> {
    /**
     * 获取最近6个月每月新增订单数
     * @param companyId
     * @param beginTime
     * @return
     */
    List<SelectResult> sixMonthNewCount(@Param("companyId") Integer companyId, @Param("beginTime")Date beginTime);

    /**
     * 获取最近6个月每月新增订单数
     * @param companyId
     * @param beginTime
     * @param endTime
     * @return
     */
    Integer betweenCount(@Param("companyId") Integer companyId, @Param("beginTime")Date beginTime, @Param("endTime") Date endTime);


    /**
     * 获取最近当年各类服务订单数
     * @param companyId
     * @param beginTime
     * @param endTime
     * @return
     */
    List<SelectResult> curYearTypeCount(@Param("companyId") Integer companyId, @Param("beginTime")Date beginTime, @Param("endTime") Date endTime);
}
